extends PanelContainer
# 武器槽
@export var item : Weapon:
	set(value):
		item = value
		$TextureRect.texture = value.texture
		# 武器最小冷却为0.01s
		$Cooldown.wait_time = max(value.cooldown,0.01)
		item.slot = self

func _on_cooldown_timeout() -> void:
	if item:
		$Cooldown.wait_time = max(item.cooldown,0.01)
		item.activate(owner,owner.nearest_enemy,get_tree())
